<template>
  <nav>
    <ul class="pagination">
      <li
        class="page-item ng-scope"
        :class="{active:item === page}"
        v-for="item in totalPage"
        :key="item"
      >
        <nuxt-link
          class="page-link ng-binding"
          :to="{ name: routerName, query:{ page: item, tag:$route.query.tag, tab:$route.query.tab }}"
        >{{ item }}</nuxt-link>
      </li>
    </ul>
  </nav>
</template>

<script>
export default {
  name: "PageList",
  props: {
      totalPage:{
          type:Number,
          required: true
      },
      page:{
          type:Number,
          required: true
      },
      routerName:{
          type:String,
          required: true
      }
  },
};
</script>